package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.JxStaff;
import com.ruoyi.system.mapper.JxStaffMapper;
import com.ruoyi.system.service.IJxStaffService;

@Service
public class JxStaffServiceImpl implements IJxStaffService {

    @Autowired
    private JxStaffMapper jxStaffMapper;

    @Override
    public JxStaff selectJxStaffById(Long staffId) {
        return jxStaffMapper.selectJxStaffById(staffId);
    }

    @Override
    public List<JxStaff> selectJxStaffList(JxStaff query) {
        return jxStaffMapper.selectJxStaffList(query);
    }

    @Override
    public int insertJxStaff(JxStaff entity) {
        entity.setCreateBy(SecurityUtils.getUsername());
        return jxStaffMapper.insertJxStaff(entity);
    }

    @Override
    public int updateJxStaff(JxStaff entity) {
        entity.setUpdateBy(SecurityUtils.getUsername());
        return jxStaffMapper.updateJxStaff(entity);
    }

    @Override
    public int deleteJxStaffByIds(Long[] staffIds) {
        return jxStaffMapper.deleteJxStaffByIds(staffIds);
    }

    @Override
    public int deleteJxStaffById(Long staffId) {
        return jxStaffMapper.deleteJxStaffById(staffId);
    }
}


